﻿
@{
    ViewBag.Title = "TongzhiPublish";
}
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">

<div class="title-content">通知发布</div>
<div>     
    <div class="form-group">
        <input class="form-control form-control-solid placeholder-no-fix" type="text" placeholder="通知标题" id="title" style="width:400px;" />
    </div>    
    <div>
        <!--style给定宽度可以影响编辑器的最终宽度-->
        <div>
            <textarea id="msg" style="width:400px;height:150px;"></textarea>
        </div>
        <div>
            <span style="font-size:11px;color:red;">注意：此通知同时推送给幼儿园所有家长app</span>
        </div>
        <div style="margin-top:10px;width:400px;text-align:center;">                        
            <button type="button" class="btn green" onclick="save()">保存</button>     
        </div>
    </div>

     

    <script type="text/javascript">
        //保存
        function save() {
            //var html = UE.getEditor('msg').getContent();
            //var str = CryptoJS.enc.Utf8.parse(html);
            //var contentBM = CryptoJS.enc.Base64.stringify(str);
            //var sourse = $("#source").val();
            var contentBM = $("#msg").val();
            var tongzhi = {
                title: $("#title").val(),
                contentWZ: contentBM,
                //sourse:sourse,
                //coverimgurl: $("#imgsourse").attr("src")
            };
            AjaxCustom({
                url: "/tongzhi/InsertPublish",
                type: "post",
                parames: tongzhi,
                callBack: function (data) {
                    if (data.code == "1") {
                        AlertMsg("保存成功");
                    }
                }
            });
        }

       
       
    </script>
</div>


